package com.bw.home.adapter

import android.widget.ImageView
import com.bw.home.R
import com.bw.home.view.HomeEntity
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class HomeTypeAdapter: BaseQuickAdapter<HomeEntity,BaseViewHolder>(R.layout.item_type) {
    override fun convert(holder: BaseViewHolder, item: HomeEntity) {
        holder.setText(R.id.tv_title, item.title)
        val view = holder.getView<ImageView>(R.id.iv_icon)
        view.setImageResource(item.image)


    }

}

